<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Test</title>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
</head>
<body>
	<h1>发送 Ajax 测试</h1>
	<h3>点击按钮发送 ajax 请求到 /customer </h3>
	<button id="test">测试</button>
	<script>
		/*<![CDATA[*/
		$(function() {
			$("#test").click(function() {
				$.ajax({
					type : "get",
					url : "/customer",
					dataType : 'json',
					//contentType : 'application/json;charset=UTF-8', //contentType很重要  
					success : function(data) {
						console.log("response", data)
					}
				});
			});
		});
		/*]]>*/
	</script>
</body>
</html>